{% extends 'base.html' %}

{% load pp_url %}
{% load argumenttags %}
{% load consensustags %}
{% load tag_helpers %}
{% load commenttags %}
{% load markup %}

{% block title %}
{% if request.object %}{{ request.object.name|title }} {% endif %} Details
{% endblock %}

{% block browser_bar %}

{% endblock %}

{% block content %}
	<div class="stage">
		<div class="issuemask">

            <div class="pagehead">
              {{request.object.arg_type.arg}} argument for {{request.object.parent.name}}

            </div>
            
			 <div class="issuebound">

                    <div class="issue">

        {% pp_consensus_get object=request.object.id user=request.user %}

						    <div class="issueback2">
                                    
{{request.object.name}}<br> 
{% pp_comment_count object=request.object.id %}                            
<div class="userinfo">submitted by <a href="{% pp_url template='user_profile.html' dimension='i' object=request.object.user%}">{{request.object.user.username}}</a>  

 {{request.object.submit_date|date:"(d/m/Y h:sA)"}}| {{ pp_comment.count }} comment{{ pp_comment.count|pluralize}} | interest:{{pp_consensus.consensus.interest|floatformat}}</div>


<div class="buttons">
<div class="iss_button">
        {% ifequal request.object.user request.user %}
                                    {% ifequal request.object.arg_type.arg "yea" %}

                                    <a href="{% pp_url template='submit_yea_argument.html' object=request.object %}" class="small button blue">edit</a>

                                    {% else %}
                                    {% ifequal request.object.arg_type.arg "nay" %}
                                    <a href="{% pp_url template='submit_nay_argument.html' object=request.object %}" class="small button blue">edit</a>

                                    {% endifequal %}
                                    {% endifequal %}

                                    {% endifequal %}
</div>
		                      {% include '_voting.html' %}

{% endpp_comment_count %}								    



</div></div>

                    
                          <div class="description">
                        {{request.object.text|markdown}}

                        </div>

                {% include "_sourcetags.html" %}

            {% include '_commentform.html' %}

            <div class="commentstructure">

            {% pp_comment_list_get user=request.user object=request.object.id request=request %}

               {% comment %} {{ pp_comment.debug_comments }} {% endcomment %}
                {{ pp_comment.comments|safe }}

            {% endpp_comment_list_get%}
        


    </div>

            </div>
            <div class="rightcol">
			{% include '_rightcol.html' %}
            </div>			</div>
		</div>
	</div>

{% endpp_consensus_get %}
    </div>
{% endblock content %}
</body>
</html>
						

